The present invention relates to a process for preparing an aliphatic or semiaromatic polyamide oligomer, in which an aqueous composition of the monomers is subjected to an oligomerization at elevated temperature and elevated pressure and the oligomerization output is preferably subjected to an expansion.